<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="perm" uri="/WEB-INF/tld/perm.tld"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html>
<html>
<script>
var ctx="${ctx}";
</script>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>首媒 - 锁屏</title>
    <meta name="keywords" content="H">
    <meta name="description" content="H">
  	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
	<meta http-equiv="expires" content="Wed, 26 Feb 209908:21:57 GMT"> 
    <!--[if lt IE 8]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <link rel="shortcut icon" href="favicon.ico"> <link href="${ctx}/static/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="${ctx}/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="${ctx}/static/css/animate.min.css" rel="stylesheet">
    <link href="${ctx}/static/css/style.min.css?v=4.0.0" rel="stylesheet"><base target="_blank">
    <script>if(window.top !== window.self){ window.top.location = window.location;}</script>
</head>

<body class="gray-bg">
    <div class="middle-box text-center loginscreen  animated fadeInDown">
        <div>
            <div class="m-b-md">
                <img alt="image" class="img-circle circle-border" src="${ctx}/static/img/logo.jpg"  width="200" height="200">
            </div>
          <%--   <h3>${user.username}</h3> --%>
            <p id="alertInfo">您需要输入密码</p>
            <form action="${ctx}/login" method="post" role="form" >
            	<p class="text-muted text-center red-check" id="alertInfo"></p>
            	<div class="form-group">
                    <label id="alertInfo" class="control-label red-check"></label>
                </div>
                <div class="form-group">
                
                    <input type="hidden" name="username" value="${mob}">
                    <input type="password" name="password" value="${password }" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"  id="password" class="form-control" placeholder=""  required="">
                </div>
                <button type="submit" class="btn btn-primary block full-width">登  录</button>
            </form>
             <p class="text-muted text-center"><a href="${ctx}/login"><small>重新登录？</small></a></p>
        </div>
    </div>
    
    <script src="${ctx}/static/js/jquery.min.js?v=2.1.4"></script>
    <script src="${ctx}/static/js/bootstrap.min.js?v=3.3.5"></script>
    <script src="${ctx}/static/js/cookie.js?v=3.3.5"></script>
    
    <script>
    
    $(function(){
		$(".gray-bg").keydown(function(event){if (event.keyCode==13)submitForm();});
	})
    
	$('#password').bind('input propertychange', function() {
		$("#alertInfo").html("");
	}); 
    
  	cookie("locaked",true,3600000);
	/* var submitForm=function(){
		$.ajax({
		    type: 'POST',
		    url: "${ctx}/login",
		    data: {
		    	username:$("#mob").val(),
		    	password:$("#password").val()
		    } ,
		    dataType: "json",
		    success:function(data){
		    	if(data.code==0){
		    		cookie("locaked",false);
		    		window.location.href="${ctx}/index";
		    	}else if(data.code==5){
		    		$("#alertInfo").html("用户不存在或用户名错误.请重试");
				}else if(data.code==3){
					$("#alertInfo").html("用户密码错误.请重试");
		    	}
		    }
		});
	} */
	</script>
</body>
</html>